# == Schema Information
#
# Table name: articles
#
#  id                  :bigint           not null, primary key
#  brief               :string
#  content             :string
#  tags                :string
#  thumbnail_img       :string
#  title               :string
#  created_at          :datetime         not null
#  updated_at          :datetime         not null
#  admin_user_id       :integer
#  article_category_id :integer
#  company_id          :integer
#
# Indexes
#
#  index_articles_on_admin_user_id        (admin_user_id)
#  index_articles_on_article_category_id  (article_category_id)
#  index_articles_on_company_id           (company_id)
#
class Article < ApplicationRecord
  belongs_to :article_category
  validates :content, :thumbnail_img, :title, :article_category_id ,presence: true

  mount_uploader :thumbnail_img, ArticleThumbnailImgUploader
end
